package com.Exception;

import java.util.Scanner;

public class Demo {
    public static void main(String[] args) {

        try {
            Scanner sc=new Scanner(System.in);
            System.out.println("请输入你的年龄");
            String line=sc.nextLine();
            int age=Integer.parseInt(line);
            System.out.println(age);
            System.out.println(2/1);
        } catch (NumberFormatException e) {
            e.printStackTrace();
        } catch (ArithmeticException e) {
            e.printStackTrace();
        }

    }
}
